import type { RouteRecordRaw } from 'vue-router';
import TecStack from '../view/main/overView/tecStack/tecStack.vue';
import NuxtFront from '../view/project/nuxt-front/nuxt-front.vue';
import Vue3Cms from '../view/project/vue3-cms/vue3-cms.vue';
import ServerNode from '../view/project/server-node/server-node.vue';
import Docslist from '../view/main/docs/docslist.vue';
import Message from '../view/main/interaction/message/index.vue';

const mainChildren: RouteRecordRaw[] = [
  {
    path: '/main/overView',
    redirect: '/main/overView/tecStack',
    meta: {
      id: 1,
      icon: 'Monitor',
      name: '总览',
      url: '/overView',
      parentId: 0
    },
    children: [
      {
        path: '/main/overView/tecStack',
        component: TecStack,
        meta: {
          id: 11,
          icon: 'Monitor',
          name: '技术栈',
          url: '/tecStack',
          parentId: 1
        },
        children: []
      }
    ]
  },
  // {
  //   path: '/main/overView',
  //   // component:import('../view/main/main.vue'),
  //   redirect: '/main/tecStack',
  //   meta: {
  //     id: 2,
  //     icon: 'Monitor',
  //     name: '总览',
  //     url: '/overView',
  //     parentId: 0
  //   },
  //   children: [
  //     {
  //       path: '/main/tecStack',
  //       component: TecStack,
  //       meta: {
  //         id: 21,
  //         icon: 'Monitor',
  //         name: '技术栈',
  //         url: '/tecStack',
  //         parentId: 2
  //       },
  //       children: []
  //     }
  //   ]
  // },
  {
    path: '/main/project',
    // component:import('../view/main/main.vue'),
    redirect: '/main/project/nuxt_front',
    meta: {
      id: 3,
      icon: 'Monitor',
      name: '项目管理',
      url: '/project',
      parentId: 0
    },
    children: [
      {
        path: '/main/project/nuxt_front',
        component: NuxtFront,
        meta: {
          id: 31,
          icon: 'Monitor',
          name: '前端页面',
          url: '/nuxt_front',
          parentId: 3
        },
        children: []
      },
      {
        path: '/main/project/vue3_cms',
        component: Vue3Cms,
        meta: {
          id: 32,
          icon: 'Monitor',
          name: '后台管理系统',
          url: '/vue3_cms',
          parentId: 3
        },
        children: []
      },
      {
        path: '/main/project/server_node',
        component: ServerNode,
        meta: {
          id: 33,
          icon: 'Monitor',
          name: '服务端接口',
          url: '/server_node',
          parentId: 3
        },
        children: []
      }
    ]
  },
  {
    path: '/main/docs',
    redirect: '/main/docs/docslist',
    meta: {
      id: 4,
      icon: 'Monitor',
      name: '文档管理',
      url: '/docs',
      parentId: 0
    },
    children: [
      {
        path: '/main/docs/docslist',
        component: Docslist,
        meta: {
          id: 41,
          icon: 'Monitor',
          name: '文档列表',
          url: '/docslist',
          parentId: 4
        },
        children: []
      }
    ]
  },
  {
    path: '/main/system',
    redirect: '/main/system/user',
    meta: {
      id: 5,
      icon: 'Monitor',
      name: '系统管理',
      url: '/docs',
      parentId: 0
    },
    children: [
      {
        path: '/main/system/user',
        component: () => import('../view/main/system/user/index.vue'),
        meta: {
          id: 51,
          icon: 'Monitor',
          name: '用户管理',
          url: '/user',
          parentId: 5
        },
        children: []
      },
      {
        path: '/main/system/role',
        component: () => import('../view/main/system/role/index.vue'),
        meta: {
          id: 52,
          icon: 'Monitor',
          name: '角色管理',
          url: '/role',
          parentId: 5
        },
        children: []
      },
      {
        path: '/main/system/info',
        component: () => import('../view/main/system/info/index.vue'),
        meta: {
          id: 53,
          icon: 'Monitor',
          name: '修改信息',
          url: '/info',
          parentId: 5
        },
        children: []
      },
      {
        path: '/main/system/daily',
        component: () => import('../view/main/system/daily/index.vue'),
        meta: {
          id: 54,
          icon: 'Monitor',
          name: '日报',
          url: '/daily',
          parentId: 5
        },
        children: []
      }
    ]
  },
  {
    path: '/main/interaction',
    redirect: '/main/interaction/message',
    meta: {
      id: 6,
      icon: 'Monitor',
      name: '互动管理',
      url: '/interaction',
      parentId: 0
    },
    children: [
      {
        path: '/main/interaction/message',
        component:Message,
        meta: {
          id: 61,
          icon: 'Monitor',
          name: '留言',
          url: '/message',
          parentId: 1
        },
        children: []
      }
    ]
  },
];

export default mainChildren;
